<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <h:body>
        <ui:composition template="template.xhtml">
            <ui:define name="tituloJanela">
                #{msgs.logo}
            </ui:define>

            <ui:define name="conteudo">
                <div id="content">                                            
                    <h:form>                                    
                        <ui:repeat value="#{jogoBean.findJogoById(idjogo)}" var="valor">                                    
                            <h:panelGroup rendered="#{empty valor.capa}">
                                 <h:graphicImage style="left: 200px" value="css/images/default.png"/><br/>                                   
                            </h:panelGroup>
                            <h:panelGroup rendered="#{not empty valor.capa}">
                                 <h:graphicImage style="left: 200px" value="#{valor.capa}"/><br/>                                   
                            </h:panelGroup>
                            Nome: <h:outputText value="#{valor.nome}"/><br/>
                            Tipo: <h:outputText value="#{valor.tipo}"/><br/>
                            Plataforma: <h:outputText value="#{valor.plataforma}"/><br/> 
                            Lançamento: <h:outputText value="#{valor.lancamento}"/><br/>
                            Stars: <h:graphicImage value="#{valor.blabla(valor.stars)}"/><br/>
                            Preço: <h:outputText value="#{valor.preco}"/><br/>
                            Descrição: <h:outputText value="#{valor.descricao}"/><br/>                                    
                            
                            <h:commandLink action="#{carrinhoBean.addJogoCarrinho(valor.idjogo)}">Colocar no carrinho!</h:commandLink>   <!-- idusuario SESSAO!!-->
                        </ui:repeat>                                                               
                        
                        
                        
                    </h:form>                                         
                    
                    <div id="compra">
                        
                        
                                                
                    </div>
                    
                </div>
            </ui:define>

        </ui:composition>

    </h:body>
</html>
